/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

FoamFile
{
    version         2.0;
    format          ascii;
    class           dictionary;
    location        system;
    object          windPyFoamDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Wind Py Foam specific parameters.

template "test_template";
runArg  "Runner";
procnr 1;
procnrSnappy 1;

caseTypes
{
    gridConvergence 0;
    gridConvergenceParams
    {
        gridRange (1 2 3 4 5);
        windDir 30;
    }
    windRose
    {
        blockMeshCellSize 60;
        /* Inlet profile, direction and freaquency of occurance */
        /* weight [0, 1.0], direction [0, 360.0], z0 [m [0,100]], TKE/us^2 [0,100], us [m/s [0,100]]*/
        windDir (
            (0.25 90  0.0003 5.8 0.4)
            (0.25 75  0.0003 5.8 0.4)
            (0.25 59  0.0003 5.8 0.4)
            (0.25 270 0.015  5.8 0.5)
        );
    };
};

// general simulation parameters
simParams
{
    nu          1.4076485e-5;   // [m^2/s]
    caseType    SHM;
};

SHMParams
{
    rectanguleDomainSTL 0;
    // for such cases - 2 z0 params can be given, one for terrain, and one for gound (area surrounding terrain which is the middle of the domain)
    terrain_z0      0.015; // [m]
    ground_z0       0.0003; // [m]

    cellSize
    {
        fLayerRatio 4; //notice if the test_template uses relative values or not
        levelRef    1;
        layers      12;
        r           1.2;
        zp_z0       20; //ratio between middle of first cell from the ground to the roughness length - 13.5 is Martinez value for Askervein
    }
    domainSize
    {
        refinement_length 80; // [m]
        typical_height 12; // [m]
        fXup        200; // upwind fetch [m]
        fXdown      800; // downwind fetch [m]
        fY          660; // dom_y = fX * a [m]
        domZ        120; // = Href [m]
        z_min       0.75;// [m]
    }
    pointInDomain
    {
        zz        111;
    }
    centerOfDomain
    {
        x0        0;
        y0        0;
    }
};

kEpsParams
{
    Cmu      0.03;    // castro 96 - redundent for windRose
    k        0.4;
};

Measurements
{
    M0
    {
        x -180.8; // [m]
        y -103.3; // [m]
        gl 0.75;  // [m] ground level
        h  40;    // [m] top level
    }

    M1
    {
        x -52.4; // [m]
        y -31.0; // [m]
        gl 0.80; // [m] ground level
        h  40;   // [m] top level
    }

    M2
    {
        x -34.9;   // [m]
        y -21.1;   // [m]
        gl 10.80;  // [m] ground level
        h  40;     // [m] top level
    }

    M3
    {
        x  3.2 ; // [m]
        y  0.0;  // [m]
        gl 11.7; // [m] ground level
        h  40;   // [m] top level
    }

    M4
    {
        x  51.5; // [m]
        y  30.6; // [m]
        gl 1.40; // [m] ground level
        h  40;   // [m] top level
    }

    M5
    {
        x   1.5; // [m]
        y -48.9; // [m]
        gl 2.60; // [m] ground level
        h  40;   // [m] top level
    }

    M6
    {
        x  -46.1; // [m]
        y    0.2; // [m]
        gl 11.50; // [m] ground level
        h  40;    // [m] top level
    }

    M7
    {
        x -66.9; // [m]
        y   0.0; // [m]
        gl 0.80; // [m] ground level
        h  40;   // [m] top level
    }

    M8
    {
        x 92.0; // [m]
        y -0.1; // [m]
        gl 2.0; // [m] ground level
        h  40;  // [m] top level
    }

    M9
    {
        x 327.3; // [m]
        y -39.3; // [m]
        gl 0.75; // [m] ground level
        h  40;   // [m] top level
    }
}
sampleParams
{
    hSample    (10 50);
    nPoints    1000;
    metMasts
    {
        inlet
        {
            x -200; // [m]
            y 0   ; // [m]
            gl 0.75; // [m]
            h 40  ; // [m]
        }

        outlet
        {
            x 700;  // [m]
            y 0;    // [m]
            gl 0.75; // [m]
            h 40  ; // [m]
        }
    }
    Nx 100;
};

// *********************************************************************** //

